<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
 <%
    // 模拟用户登录
    request.getSession(true).setAttribute("user","admin");
    //页面跳转
    // request.getRequestDispatcher("").forward(request,response);
   //  response.sendRedirect("http://www.taobao.com");
  %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>测试页面</title>
<script type="text/javascript">
     function gotourl(){
     	location.href="http://www.taobao.com";
     }
     function  autolink(){
    	 setTimeout("gotourl()",3000);
     }
</script>
</head>
<body>
   <a href="search.jsp">搜索商品测试</a>
   <a href="javascript:gotourl()">页面跳转</a>
   
   <a href="javascript:autolink()">3秒后页面自动跳转</a>
</body>
</html>